//
//  DAOTruffle.h
//  ContactSQL
//
//  Created by m2sar on 05/03/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>

@class Contact, Gateway, Coupon;

@interface DAOTruffle : NSObject {

	sqlite3 * database;
}

@property (nonatomic, readwrite, assign) sqlite3 * database ;

- (id)init; 
- (id)initWithDatabase : (NSString *) testDatabase;

- (int) addContact:(Contact *)contact ;
- (int) removeContact:(Contact *)contact ;
- (NSMutableArray *) getContacts;
-(BOOL) isFavori:(Contact *) contact;

- (int) addCoupon:(Coupon *)coupon ;
- (int) removeCoupon:(Coupon *)coupon;
- (NSMutableArray *) getCoupons;

- (void) saveSelf: (NSMutableDictionary *)dict;
- (NSMutableDictionary *) getInfoSelf;

- (int) addGateway:(Gateway *)gateways;
- (int) removeGateway:(Gateway *)gateways;
- (int) removeGatewayRef;
- (NSMutableArray * ) getGateways;
-(BOOL) isFavoriGateway: (Gateway *) gateway;
- (Gateway *) getRef;



@end
